From f1aa37c3229fff28294d612f7c0a77a4463e0aaf Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Thu, 22 May 2014 14:50:11 -0700 Subject: [PATCH] More log output --- src/cargo/core/manifest.rs | 4 ++++ src/cargo/ops/cargo_compile.rs | 8 +++++++- src/cargo/ops/cargo_rustc.rs | 5 +++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/cargo/core/manifest.rs b/src/cargo/core/manifest.rs index 34f11fe0d..cb188e1cd 100644 --- a/src/cargo/core/manifest.rs +++ b/src/cargo/core/manifest.rs @@ -194,6 +194,10 @@ impl TomlManifest { // Get targets let targets = normalize(&self.lib, &self.bin); + if targets.is_empty() { + debug!("manifest has no build targets; project={}", self.project); + } + let mut deps = Vec::new(); // Collect the deps diff --git a/src/cargo/ops/cargo_compile.rs b/src/cargo/ops/cargo_compile.rs index a01004d0c..3d09850c2 100644 --- a/src/cargo/ops/cargo_compile.rs +++ b/src/cargo/ops/cargo_compile.rs @@ -26,10 +26,16 @@ use util::{other_error, CargoResult, Wrap}; pub fn compile(manifest_path: &str) -> CargoResult<()> { log!(4, "compile; manifest-path={}", manifest_path); - let root_dep = try!(ops::read_manifest(manifest_path)).to_dependency(); + let manifest = try!(ops::read_manifest(manifest_path)); + + debug!("loaded manifest; manifest={}", manifest); + + let root_dep = manifest.to_dependency(); let configs = try!(config::all_configs(os::getcwd())); + debug!("loaded config; configs={}", configs); + let config_paths = configs.find_equiv(&"paths").map(|v| v.clone()).unwrap_or_else(|| ConfigValue::new()); let mut paths: Vec = match config_paths.get_value() { diff --git a/src/cargo/ops/cargo_rustc.rs b/src/cargo/ops/cargo_rustc.rs index 2629cb2c5..dbd2441b1 100644 --- a/src/cargo/ops/cargo_rustc.rs +++ b/src/cargo/ops/cargo_rustc.rs @@ -10,6 +10,8 @@ use util::result::ProcessError; type Args = Vec; pub fn compile_packages(pkgs: &core::PackageSet) -> CargoResult<()> { + debug!("compiling; pkgs={}", pkgs); + let mut sorted = match pkgs.sort() { Some(pkgs) => pkgs, None => return Err(other_error("circular dependency detected")) @@ -29,10 +31,13 @@ pub fn compile_packages(pkgs: &core::PackageSet) -> CargoResult<()> { } fn compile_pkg(pkg: &core::Package, pkgs: &core::PackageSet, exec: |&ProcessBuilder| -> CargoResult) -> CargoResult<()> { + debug!("compiling; pkg={}; targets={}; deps={}", pkg, pkg.get_targets(), pkg.get_dependencies()); // Build up the destination // let src = pkg.get_root().join(Path::new(pkg.get_source().path.as_slice())); let target_dir = pkg.get_absolute_target_dir(); + debug!("creating target dir; path={}", target_dir.display()); + // First ensure that the directory exists try!(mk_target(&target_dir).map_err(|_| other_error("could not create target directory"))); -- 2.30.2